import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
//import {defHttp} from '/@/utils/http/axios';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '分类名称',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '状态',
    align:"center",
    dataIndex: 'status_dictText'
   }
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "分类名称",
      field: 'name',
      component: 'JInput',
      //colProps: {span: 6},
 	},
  /*
  {
    label: "学期",
    field: 'pop1',
    component: 'JSelectDialog',
    componentProps: {
      rowKey:'id',              //(非必填，默认值即为id) 
      labelKey: 'name',         //用于显示的字段(非必填，默认值即为name)
      showButtom:false,        //是否显示选择按钮
      isRadioSelection: true,  //是否单选
      dialogWidth:"900px",     //弹窗宽度
      modalTitle:"请选择学期",  //弹窗标题
      formConfig:{             //弹出窗表格查询表单定义
        schemas:[
          {
            label: '学期名称',
            field: 'name',
            component: 'JInput',
            colProps: {span: 12},//参数宽度定义：总宽度为24，12表示占整行的一半
          }
        ]
      },
      tableColumns:[           //弹出窗表格列表展示内容定义
        {
          title: '学期名称',
          dataIndex: 'name',
          // width: 180,
        },
        {
          title: '状态',
          dataIndex: 'status_dictText',
          // width: 180,
        }
      ],
      params:{status:1},   //弹出窗口列表查询参数传递
      apiUrl:(params)=> {
        return defHttp.get({url: '/course/csSemester/list', params})
      }
    },
  },
  */
	{
      label: "状态",
      field: 'status',
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"userAble"
      },
      //colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '分类名称',
    field: 'name',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}